<?php

/**
 *  @FileComment            [后台评论管理控制器]
 *  @ProjectName             项目名称：JDshop
 *  @FileName                   文件名称：CommentController.class.php
 *  @Author                       yuerengui <596580041@qq.com>
 *  @Date                          2014-10-23 0:33:44
 *  *
 */
class CommentController extends CommonController {

        public function index() {
                //显示所有用户评论
                $data = K('OrderOrderListCommentView')->get_data();
                $this->assign('data', $data);
                $this->display();
        }

        public function changestatu() {
                //审核评论
                $statu = Q("get.statu");
                $coid = Q('get.coid', 0, 'intval');
                $comment = K('Comment');
                switch ($statu) {
                        case 'pass':
                                $comment->update_data($coid, '审核已通过');
                                break;
                        case 'nopass':
                                $comment->update_data($coid, '审核未通过');
                                break;
                }
                $this->success('审核成功！');
        }

}
